const { EventEmitter } = require('events');
module.exports = { EventEmitter };

class MyEmitter extends EventEmitter {}
const customEmitter = new MyEmitter();

customEmitter.on('customEvent', () => {
  console.log('Custom event fired');
});

customEmitter.emit('customEvent');

// function TestObj1() {
//   this.name = 'test';
//   this.age = 18;
//   this.say = function () {
//     console.log('hello');
//   };
// }

// function TestObj1(this: any) {
//   this.name = 'test';
//   this.age = 18;
//   this.say = function () {
//     console.log('hello');
//   };
// }
class TestObj1 {
  name: string = 'test';
  age: number = 18;
  say() {
    console.log('hello');
  }
}

class TestClass extends TestObj1 {}
const testObj = new TestObj1();

console.log(testObj.age);
